import { createApp } from 'vue'
import mitt from 'mitt'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'uno.css'
import 'normalize.css'

import 'font-awesome/css/font-awesome.min.css'
import '@/style/index.scss'
import './assets/style/base.css'

import 'virtual:svg-icons-register'
import App from './App.vue'
import router from '@/router/router'
import store from '@/store'

const app = createApp(App)
const bus = mitt()
app.config.globalProperties.$bus = bus

//注册element所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app
  .use(ElementPlus, {
    locale: zhCn,
  })

  .use(router)
  .use(store)
  .mount('#app')
